public class Exercise3 {
    public static void main(String[] args) {
        // 1. 打印偶数
        System.out.println("1-100的偶数:");
        for (int i = 1; i <= 100; i++) {
            if (i % 2 == 0) {
                System.out.print(i + " ");
            }
        }
        System.out.println();
        
        // 2. 计算奇数和
        int oddSum = 0;
        for (int i = 1; i <= 100; i++) {
            if (i % 2 != 0) {
                oddSum += i;
            }
        }
        System.out.println("1-100奇数和: " + oddSum);
        
        // 3. 九九乘法表
        System.out.println("九九乘法表:");
        for (int i = 1; i <= 9; i++) {
            for (int j = 1; j <= i; j++) {
                System.out.print(j + "×" + i + "=" + (i * j) + "\t");
            }
            System.out.println();
        }
    }
}
